module libeventd.buffer.event.Struct;

import
	libeventd.Types;

extern(C):

struct event_watermark {
	size_t low;
	size_t high;
}

struct bufferevent {
	event_base*		ev_base;
	bufferevent_ops*	be_ops;
	event			ev_read;
	event			ev_write;
	evbuffer*			input;
	evbuffer*			output;

	event_watermark	wm_read;
	event_watermark	wm_write;

	bufferevent_data_cb readcb;
	bufferevent_data_cb writecb;
	bufferevent_event_cb	errorcb;
	void*			cbarg;
	timeval			timeout_read;
	timeval			timeout_write;
	ev_short enabled;
}